# Form Actions

<EpicVideo url="https://www.epicreact.dev/workshops/react-fundamentals/form-actions" />

👨‍💼 `onSubmit` handlers that prevent default and handle file uploads like this
are so common that React has a built-in way to do that! The `action` prop on a
form can accept a function! The function accepts a `formData` object.

<callout-warning class="aside">
	Note that in HTML, attributes cannot accept functions. The action prop
	accepting a function is a React feature.
</callout-warning>

In this exercise, create a function for logging the `formData` like we are
currently and delete all the superfluous props.

📜 [`<form />` React docs](https://react.dev/reference/react-dom/components/form)
